using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace InfiniTec.Threading
{
   	/// <summary>
	/// Exception thrown when a synchronous call of an <see cref="AsyncOperation"/> has failed.
	/// </summary>
	[Serializable]
	public sealed class AsyncOperationFailedException : Exception
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationFailedException"/> class.
		/// </summary>
		public AsyncOperationFailedException() {}
	
		/// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationFailedException"/> class.
		/// </summary>
		/// <param name="message">The message.</param>
		public AsyncOperationFailedException(string message) : base(message) {}
		
		/// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationFailedException"/> class.
		/// </summary>
		/// <param name="message">The message.</param>
		/// <param name="innerException">The inner exception.</param>
		public AsyncOperationFailedException(string message, Exception innerException) : base(message, innerException) {}
	
                /// <summary>
		/// Initializes a new instance of the <see cref="AsyncOperationFailedException"/> class.
		/// </summary>
                /// <param name="context">The <see cref="StreamingContext"/> to recreate the exception from.</param>
                /// <param name="info">The <see cref="SerializationInfo"/> to recreate the exception from.</param>
                private AsyncOperationFailedException(SerializationInfo info, StreamingContext context): base(info, context) {}
	}
}
